<?php
defined('BASEPATH') OR exit('No direct script access allowed');
	class Product_img_model extends CI_Model{
        public $table_name='product_img';
    	public function get_all(){
            $query=$this->db->get($this->table_name);
            return $query->result();
        }
        public function get_one($id){
            $query=$this->db->where('id',$id)->get($this->table_name);
            return $query->row();
        }
        public function get_product_img($product_id){
        	$query=$this->db->where('product_id',$product_id)->limit(4)->get($this->table_name);
        	return $query->result();
        }
         public function get_child_id_img($product_id){
            $query=$this->db->where('product_id',$product_id)->limit(4)->get($this->table_name);
            return $query->result();
        }
	}